package com.probiz.estore.common.model.system.base;
/*
 *  Created on Wed Aug 18 17:11:12 CST 2010
 *
 */
import java.io.Serializable;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;

/**
 * AppResourceRole Primary Key Class  
 * 
 * This is the Primary Key class for app_resource_role
 * 
 */
 
public class AppResourceRolePK  implements Serializable {

    protected Integer roleId;
    protected Integer resourceId;

	/**
	 * Default Constructor for Primary Key Class
	 */
	public AppResourceRolePK() {
		super();
	}
	/**
	 * Keys Constructor for Primary Key Class
	 */
	public AppResourceRolePK(
			 Integer in_roleId
			,Integer in_resourceId
	) {
		super();
			this.roleId =  in_roleId;
			this.resourceId =  in_resourceId;
		}
  /**
	*
	* @return Integer
	*/
	public Integer getRoleId() {
		return this.roleId;
	}
	
  /**
	* Set the roleId
	*/	
	public void setRoleId(Integer aValue) {
		this.roleId = aValue;
	}
  /**
	*
	* @return Integer
	*/
	public Integer getResourceId() {
		return this.resourceId;
	}
	
  /**
	* Set the resourceId
	*/	
	public void setResourceId(Integer aValue) {
		this.resourceId = aValue;
	}
   /**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof AppResourceRolePK)) {
			return false;
		}
		AppResourceRolePK rhs = (AppResourceRolePK) object;
		return new EqualsBuilder()
				.append(this.roleId, rhs.roleId)
				.append(this.resourceId, rhs.resourceId)
				.isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.roleId) 
				.append(this.resourceId) 
				.toHashCode();
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("roleId", this.roleId) 
				.append("resourceId", this.resourceId) 
				.toString();
	}
}